fixed some errors, added output