populate function
timeout corrected