initial upload. needs a good refactor - just wanted to get something working