working robot code