implemented most of the remaining components for PDP