calculations now work