Added two functions

Added comments to functions. Added functions to calculate SIP, CI