barely working autonomous code