Stability of underground openings in stratified and jointed rock