added loading texts and refactored

added loading texts and refactored