Added a tolerance feature and dependencies for proper testing and prod environment