updated frontend code