took out endsize from tempering function