attempt at debugging where this is going wrong