Some extensive re-implementation for issue #6 to work. Need some tests