added getDoc functionality