final version before unit test