import pdb only when needed
Never ever ever "except:" without specifying exception
Allow specifying initial matrix state - useful for testing
added some tests