updated frontend, refactored