some java/coffeescripting