Incorporated input and output validation