removed puts debug statements