working relative activity calculation script