[#5] refactoring of the constructor