create get_euler function, gives the same results as Seth's code