expanded out the get-pdu function, probably going to rename it in the future