simpler regex, better error handling on makeapi arror