refactoring and reorganizing tests
use writestreamp
use nickie module