minor logic update