changed api to ensure optionals, added get-methods for functions not returning optionals