some changes in core. added simple test.