Fix ordering
Use add function variable in tests