worked out a few bugs at least