pre function space set up