handling contraints in partition creation