Make mark function protected and god a friend