added changable writer and documentaion