added stuff from pat