new algorithm

added background parameter to initializeCanvas method