Improved memory usage by getting single word query from size map