fixed all warnings, optimized initial dance function