added array type hinting to constructor and getInstance