added various client code