making a very bad algorithm