added base requirements.txt, fixed main loop