add multiple policies support
merge with restAPI