updated == function