can you explain what you want, fix the syntax errors so we have a clean starting place, and help us help you? Its largely nonsense code, not a single comment as to what it is supposed to do, and almost written as if intentionally trying to be convoluted or wordy... take the compare function, why not just return the result of the boolean logic, why wrap that in a conditional block?