fixed some errors in foo2