add and update features with tests, refactor needed, and the UI

add and update features with tests, refactor needed, and the UI