removed use of pass-by-reference from API