some formatting, removed unnecessary check for user input