prepare for extracting logic