added documents. fixed some problems