added console.log statements