THEORY OF FITNESS IN A HETEROGENEOUS ENVIRONMENT