added testing module, some additional functions