adding variable to check if it is possible to skip page reload.