suporting n threads like a boss