implemented helper method in remaining locations