refined the ui coding