added support for specifying state and added legend on recommendations page