My own code for the Programming assingment 2