modified the main class.