rewrote alberti example to be cleaner and more abstract