Added new Z-Index Feature
Modified z function