fixing retarted logic error..... doh...., and fixing formatting