adapted to 'module' usage