now works with modules too