move data to sample
add length constrain in server