some changes. Added loading bar.