refactored get code into its own module.