moved tests to unit