Modified code for UMAT50s compatability