Modified code to handle Transfer In