refining to get better clusters and fixing bugs

should follow TDD