Adding the error calculation
Adding the error cacluator and merging