revised on ubuntu 12.04 env