Added dictionary lookup for speed