style rewrite of db script