g is function that returns Option