added more sql script generation functionality