Fixed documentation and changed to helper function