lib code and readme v0.1