removes extra space
adds a refresh command