Refactored a method out into a seperate file called helper_lib