added activerecord specific stuff