added activerecord and JSON