added definition of modal depth