some minor updates and refactoring