adding documentation, minor cleanup, asserting consistent results between fast and slow dyn prog