checkpoint on refactor args and sql