code from a while ago that builds/handles brackets in ember.js