move exp function to its own file