changed sync to push, added pull functionality