private helper method