sync reimplementation