initial test and refactory structure
start refactory and test