Based on an original submission by William Yodlowsky <bsd at openbsd dot rutgers dot edu>. help and ok steven@