working implementation of INNER JOIN.