adding miness function and test