added persistence and mongoid integration