modifying to work on ubuntu 12.04 LTS