Input validation + updateded doc