Adding optional 'reverse' argument to function delcaration