cleaning up code
reads json from txt for easier testing