renamed variables and functions from schema to edgeSchema