added boundary conditions for calculating utility of shielded pieces, and added the utility functions for these shielded pieces
fixed comments