Z vector calculations

Added method to calculated and add z vector to model