Updated functions to accommodate for Ubuntu