completed v sync and h sync