fixed phase sync, added python api to mimic