add rendering loops and drawing loops in coffee script