continue writing socket fucntions wrappers