restructure frontend