modify create tables method