refresh button functionality finalized