Code for doing range of penalties for PELT