Tested on solaris. Working...