small logic cleanup