regulation of apoptotic process