fixing minor refactoring issues