fix user check and now DRY