update reference to main class