debuging (what a mess)