Almost finished

added a new function: caseCheck and made the code a little more
readable