Without seeing your actual code it's hard to give suggestions.
_________________________
There are two types of vessels, submarines and targets.