Completion fitness function now works with multiple states