junit(bugs are fixed, tests added)