Exista deja thread pentru asa ceva si in plus... you're doing it wrong