more debugging. somewhere in here there is a problem. or so it seems.