small code tune in legacy style