removed internal err declaration