added js console logs for testing