minor logic updates