bugs fixed and methods updated.