refact the code 
add notes to README