restructured the code, added 3D effect (not finished).