fix UX issue and refactor