initial commit - need a lot of refactoring