refactoring and adding emitters and better access handler