added Either, added some functions