updated reloading. should be safer