more refactoring
fixed a bug and removed unused methods