separate energy functions to separate files