Adds level function so we can use it in more than one place.
Merge pull request #13 from himedlooff/master

Adds level function so we can use it in more than one place.