:pre constraints added to functions