Refactor to support more operations in future