Simplify code
add debug statement