Tim changed his code a bit, added Jasmine's code