created helper method