fixed test
reimplemented caching; fixed detection of BOT 'os'