small logic tweak and cleaned bad comments