Modified getData function…still not working