working comparetbl