added input data validation by elegant exception class