fixed various test issues based on example implementation.