added factorials function
added a few samples for strings