introduced norm function for dimensions, eases times algorithm