incorrect condition was fixed. i must think about this algorithm later. now - week 2