fixed comments in logic