refactoring
bug fixes; refactoring