updated constructor to include support for final arg, $customAttributes