little changes in logic
another portion of logic changes