some code modified