working, but need to fix hs and vs sync