got the basic functionality working pretty well