Logic is fine, can't see the error. Will search.