Forgot to save helper functions. Added some comments