working out the bugs