use type and value comparison