new z-projection function