modified for optaplanner