Added Leslie's changes to Functions