now with debugging