some minor logic cleanup