simplified the code, added animations!