Updated code to avoid using of dynamic keyword in client code