refactor execute utility