removed writeline for debug