moved console log statement
removed unnecessary lines