Implementation of Code Elevator challenge (see http://www.code-story.net/blog/posts/s03e00)