Make agnostic to what function will be run