added to_json to methods file