added socket support