lots of fixing...and some breaking