created init handler function