refactor/rebuild frontent