working modulo and fade for 4.6 UI