some python and sql script changed