finish up nawms library, add unittest