added elseif statement and console print, also comments submitted.