added latex code and another example