made paint function nicer...