Congratulations on solving the problem. Just remember the KISS principle!
_________________________
There are two types of vessels, submarines and targets.