changed code to not use JS reserved word "name"