Added proposed logic for issue #2
Finised merge