starting to bring in code from time machine project