added delay to session loop