filtering invalid assignments