modularized some testing