added rpi calculations and helper functions to Squad