added dictionary and part of handling it