updated to work with osclass 3.2+ (will not work with previous versions!)