added simple function to calculate z order of object