combined index and regular story functions into 1 script, perf improvement