separated logic and draw