this method should be broke down into smaller methods called from the test case