merge from storedpolicy branch