fix bug calling old function name
improve formatting