Moved the class function to its own file