small code structure change