use proper dictionary, clean up