Added xtract function