Replaced $tm with $ts (#35)