added persistence, fixed trades performing multiple times