early working 0.5.0 version with tests