Started writing the roll function