redo frontend in javascript