added command line option for selftest, still needs to implement