trying not to use Exceptions here. Seems wrong!