stubs and mocks added for puts,divide by zero,exit function refactored