Working example of extending in both directions