use better variable names instead of s and d