Updated to work with iPad