extract style parsing and z calculation