rewritten deploy