to_json

made some functiosn return json instead of active record