more steps moving functions to layers model
applying new layer functions to count data layers and legends