Flexibility key to worker happiness: study