getting layer priority right