used constructor pattern