matrix rewritten in coffescript