moved map filtering from view to directive