added type hinting to fix strict errors