fixing the issue with keeping track of user ids
now working - more or less