remove reference to @client and wrapped in function