write-up pdf and tex updated with math formulation