tightned the code