some code enhancement