added a test registration feature
added multithread and divided the code in classes