[WIP] refacto apply option, error with preprocess + maxweight