add functions in order to stay dry