backwards compatability for ios7 and ios8