changed tab from 2 to 8 spaces, put functions to the end
added sync function