Another way to handle preprocessing