loop method updated
reading frames bug fixed
some testing is done before switching to a multithreading