rewrote js to extend SHIP object