Added function for rectangular cross section