[FrontEnd] rewrite for new API