refactored xft