modified for ubuntu