refactor of arrow.coffee