del and optimize code