added parameter to manually set fragment size