make canvas more object orientated