adding timing function
fixing merge conflicts
adding pure python sag