modified for Ubuntu