Further modifications to functions