finished updating roll function