some progress, but I still need to figure out the errors