added console log and variables