initial commit - needs significant refactoring, redesign and testing