added loading message during startup
simplified code