working through some bugs