chain library added
changed visibility of some atributes and methods from private to
protected