Gruel, i've quickly browsed your code and there's something i don't quite catch: the optimization about last_score done during the loop on coeffs is wiped out afterward ("last_score=256*256*256*120"). Is it correct? bye, Skal