WIP: debugging code added