added logging to js console