Sanity checks do work. The program works now as it was supposed