modify sql commands
fix config
add working header