moving wrapper js class to client emit fn