remove extra semicolon, replace alerts with console logs