added progress bar for taking picture