tidied up code in decpwd.c