-updated and added more debug lines