Change variable name, function expression and make groupSize a class variable
add abstraction for fade in and fadeout interval