minor refactoring and some minor progress amde
minor refactoring
fixing merge conflicts
minor refactoring