refactored code to use easeljs/createjs