a bit refactoring and added anchor class