addition zIndexGroupLevel instead of choosing max + added unit test