use legacy function for ubuntu 12.04