Added function anchor(), which makes the code more readable and flexible