frontend refactored