Scientists decode mechanism behind how the brain makes a decision