Extracting unnecessary function