everything working, finally. To do if more time later: add refresh button