minor improvement in code