further enhancement of code