reworked refresh mechanism