complete draw logic.