Modified for Nonplanar surfaces for EP