The molecular basis for the functional evolution of an organophosphate hydrolysing enzyme