changed sync state to an integer, broke testing for some reason