refactoring; tags addition fixed