Changes to roll function