added mkmans and selftest