Reduced code - it became more mathematical