working better - debugging now