clone repository function