changed lib structure a bit