little changes in logic