made create call more efficient. improved error handling.