Adding functions to monitor kinetic energy