changed frontend code