Skeleton code for automatic fits