remove console.debug
simplify export code