added java doc on method