mods to some analysis functions