lib to sh, minor changes..