following crafty.js tutorial