updated ibs, function prototypes in main