added raising exception to add client function