most of PDP implemented - structure fixes