Adding generate_stimulus method

- copied over from utils file.
- some functions not included (left commented out). need to figure out why they were there in the first place...

Related to issue #30