more complete 3d example