write algorithms in new format

+ update environments for theorems
Merge pull request #15 from magdaleen/experimental

write algorithms in new format