Add modulo pattern do organize socket actions