dictioanary fuctionality implementation -  error corrected