some helper methods and better documentation