removed the need for the first ajax call.