fixed a bit number 7, TODO: insertRegistry(), created tests.c