update reg script and made tables