refactor the code
add info