modified create tables script