Adds shorter implementation for exercise 1