applied changes proposed by Stebalien