code refactoring (options extending)