Plasma condensation in coronal loops