recursion func changed to ordinary one; progress bar and cancel button added