fix ad reporting, add pwd() function