added new helper functions to Level.js