add reloading logic