fixes

fix up a DB query that was producing headscratch-inducing results,
sort-of-ish begin work on user behaviour.