added doc as parameter