changed locations to numpy arrays