adding explicit socket argument