refactoring
resolving insert bug (huge)