added separate classes for socket