Added dictionary and main feedback loop