refactoring: using generic get/insert methods with dynamic arguments