rearranged unittest code a little bit