make priority configurable / rename some fns