improved canvas utils, imported Q