edit progressBar and adding session check