better name for diff type funtion