Changed script to ksh