revised callback function
added capability to save actual alignment string