Updated to support iOS