Original code, that is working with 3.1 version.