debugging reorder issues
updating references to deprecated functions