instead of using while, try to create draw(t) func