initial version based on Rails Challenges talk