code modified and added