removed console output and wrapped long lines of code