updated methods to work with newest version of AFnetworking