refactoring front-end

refactoring front-end