small code adjustments