renamed fn
added ts param for arbitrary point-in-time view