added code to load three tables - v2