optimized using linkedhashsets, broke many other things but the bouncing animation still works