combine math function into one & set different groups of item in canvas