updated restrict drawing