small code simplifications