refactored constants and timestep