removed console.log's meant for debugging