joining data from tables method