refactored user code to seperate package