The provisions of this chapter may be varied by written agreement of the parties.