unused variable and console log removed