updated to compatible with 3.1 Osclass