added ability to use hidden facets
brought up to coder standards