move painting logic to boundary class