removed server-side console.logs, fixed a syntax error
fixed bug in server-side code