added console print out and comment