Forming time-stable homogeneous groups into Online Social Networks