refactor to execute concrete implementation only when needed