refact for deploy