#31: refactoring