stack tested
start to refactor core test