change res to result in tests, thanks to Ilian