Some code improvement