some changes to perform rest