added ability to convert to raw key