some code edited