adding an optionals class for working with optionals + tests