Add validating for input data
Prepare for adding tests