Validate function, create residual table
Fix for usage function