initial setup of problem and taking in user input completed