moved fn to separate ns