converted for iOs7