Added logit function and documentation