Creating a the plug and socket