auto refresh for frontend