updated to 8 inputs