changed deprecated constants to support ios 8