changed a few lines for debugging