fixed syntax. changed logUpCheck to use simple check. added comments