changed to using common interface between client and server