a little refactor on code
move staff to constructor
change corresponding test file