created functions
Merge branch 'master' of https://github.com/aparghel94/ProgrammingAssignment2