implemented 'only_active' option
implemented 'only_active' option, Part II