finalized the scripts. needs more testing but should work.