revamp getFacets

better handling with eval(layer)