export function tested...more tests needed