refactor as per request from Craig