Added functionality to functions in the file