fixed the half-finished modifications from last 2 commits