minor bit of code refactoring