function solution for Option exercise added