implemented ui hash
refactored code -- use promise in refreshTable function and use ui hash for buttons view