added reputation logic