Updated to a more curry-like style