adding tests and making more modular
updating readme