moved some functions to helpers. means dm policy is now broken. needs updates accordingly