added several changes to handle pam payments import