modified to resolve issue