added ajax fuction for retrieving waards