pulled out private fn to remove duplication
update README