refactored to make more backbone-esque