snippet now copies to main class.