cleaned up the printf-s for debugging