correct nested class problem