Removed puts from substring method