added test if layer already exists