added the choice of diagonal elements