main class fixes