added animation and did some restructering