added type hinting to class constructor