Minor update
Prettify the logic