Finishes challenge3, fixes bug in challenge5