some bugs left + documentation