added active_record extension-to models