Flexibility function