turn if into elsif for synch condition