copying over code from bitbucket repo

This is old work that I did