timer added to test if ajax call is complete.