use eitherDecode instead of decode