changed loading animation and moved code