moved code to import file to seperate function
code formatting
Removed commented code