optimised the ServerDataListener class