implement comparison operators via neat trick