modularized the code
all tests