Updated example to map entities