split habitat.r for simplicity