fix code, remove deprecated keyword