change to canvas text and refactoring