added automatic refresh