Clean code

this is only re-factory the code try to make more readable