Elements of ecology