updated for ios7