port of functions from backbone.js model