Changes added to comply with coursera assigments