added new getepoch func and made call more generic