now size of canvas is calculated automatically, removed debugprints