add sql and improve go