moved functions from rollmethod to helperjs to allow for easier readability