updated hooks to work with osclass 3.2