moving some mpu code around