pull out truncate align function