initial code completion of submarine app.  needs to be tested.