refactor run class