separate calculations into methods and create a module for generic methods and constants