removed console.log statements used for debugging