core client code