the make substring method