Updated to Simpledata and new parameters, and some error fixed.