use Uncertain instead of Either
remove unused imports
remove unused code