implemented is_over as a stopping condition for smalln
bugfix in encounters file