Use #inject instead of begin...end block