updating refresh button and refining threading process a little