updated doc and some latex templates