Added loop for progress and enabling and disabling button