Where did Clash of the Titans story come from?

The original story was from greek mythology and was just about perseus defeating medusa but in the movie they added the kraken which is never mentioned in any greek myth.