Added logic for parsing Join statements