preprocessing prototype