correct Optional<Long> output