Dev 1.0

latest and finalize details of my project
We can refactor this method by extracting each cases into different methods so the code will be readable.