edit front logic