Make partition size dynamic