refactor: reduce indentation