litte refactor on the test