Dev

fix for #43 
code refactory