pass draw inside requestAniamtionFrame