to_json needs to accept arguments