- refactored optionals handling