Improved catching up and refactored