removed calls to console() and added comments