added put function for suffix tree