implemented client-side assignment logic