Updated to handle the latest changes