several small changes, fixed/shortened lots of stuff, fixed output at the end