tests rewritten to coffeescript