update sql and modify style