Add logic for socker