improvements + debug