many changes

test classes improved
type conversion corrected