many changes...  works in Ubuntu 14.04