Modified and cleaned up the existing test