add optional chaining, type and extension