add to canvas methos: now accepts single object or array of objects