working through a bug