optional will write the value if value is present not skiping anymore