ugh. did not handle error states correctly.