Improve 2 arg function parsing solution