clean up, add python mode