added pirate functionality