made the output more consistent, fixed a few bugs