optimized the loading a bit. still need to add some kind of waiting or loading indicator.