change the prepare functions to be return functions (they only do instan...

...taneous operations) so they are more clear