began work on js conversion to coffeescript