add countdown function to xpm